package com.sh.data.engine.application.model.request.datadev;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @auther: zigui.zdf
 * @description:
 * @date: 2020/9/25 15:50
 */
@Data
@Schema
public class OfflineDevTaskCloneRequest {

    @Schema(description = "被克隆的节点id")
    private Long id;

    @Schema(description = "工作流任务节点id（作业开发不用传入）")
    private Long taskFlowNodeId;

    @NotBlank(message = "任务名不能为空")
    @Length(min = 2, max = 64, message = "名称长度为2-64个字符")
    @Pattern(regexp = "[a-zA-Z0-9_\\u4e00-\\u9fa5]+", message = "名称支持中文、字母、数字、下划线")
    @Schema(description = "任务名", requiredMode = Schema.RequiredMode.REQUIRED)
    private String taskName;
}
